package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WorkFaultMapper;
import com.ruoyi.system.domain.WorkFault;
import com.ruoyi.system.service.IWorkFaultService;
import com.ruoyi.common.core.text.Convert;

/**
 * 故障表Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-04-20
 */
@Service
public class WorkFaultServiceImpl implements IWorkFaultService 
{
    @Autowired
    private WorkFaultMapper workFaultMapper;

    /**
     * 查询故障表
     * 
     * @param id 故障表ID
     * @return 故障表
     */
    @Override
    public WorkFault selectWorkFaultById(Long id)
    {
        return workFaultMapper.selectWorkFaultById(id);
    }

    /**
     * 查询故障表列表
     * 
     * @param workFault 故障表
     * @return 故障表
     */
    @Override
    public List<WorkFault> selectWorkFaultList(WorkFault workFault)
    {
        return workFaultMapper.selectWorkFaultList(workFault);
    }

    /**
     * 新增故障表
     * 
     * @param workFault 故障表
     * @return 结果
     */
    @Override
    public int insertWorkFault(WorkFault workFault)
    {
        return workFaultMapper.insertWorkFault(workFault);
    }

    /**
     * 修改故障表
     * 
     * @param workFault 故障表
     * @return 结果
     */
    @Override
    public int updateWorkFault(WorkFault workFault)
    {
        return workFaultMapper.updateWorkFault(workFault);
    }

    /**
     * 删除故障表对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWorkFaultByIds(String ids)
    {
        return workFaultMapper.deleteWorkFaultByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除故障表信息
     * 
     * @param id 故障表ID
     * @return 结果
     */
    @Override
    public int deleteWorkFaultById(Long id)
    {
        return workFaultMapper.deleteWorkFaultById(id);
    }

    @Override
    public WorkFault findByFormId(Long id) {
        return workFaultMapper.findByFormId(id);
    }

    @Override
    public List<WorkFault> selectWorkFaultByFormId(String ids) {
        return workFaultMapper.selectWorkFaultByFormId(Convert.toStrArray(ids));
    }

    @Override
    public void deleteWorkFaultByFormId(String ids) {
        workFaultMapper.deleteWorkFaultByFormId(Convert.toStrArray(ids));
    }

    @Override
    public Long insertWorkFaultByIds(WorkFault workFault) {
        return workFaultMapper.insertWorkFaultByIds(workFault);
    }

    @Override
    public WorkFault selectWorkFaultByForm(Long id) {
        return workFaultMapper.selectWorkFaultByForm(id);
    }

}
